<template>
  <div class="big-box">
      <div class="header">
          <h3><span @click="fun()"><img src="/image/Mine/zjt.png" alt=""></span>设置</h3>
      </div>
      <div class="main">
          <div class="main-box">
            <ul>
                <li v-for="(v,i) in setarr" :key="i">
                    <router-link to="">
                      <img :src="v.img" alt="">
                      <p>{{v.settext}}</p>  
                    </router-link>
                </li>
            </ul>
          </div>
      </div>
      <div class="footer">
          <div class="footer-box">
              <router-link to=""><h4 @click="loginout()"> 退出当前账号</h4></router-link>
          </div>
      </div>
  </div>
</template>

<script>
import {getlink} from "@/api/getlogin.js"
export default {
    methods:{
        fun(){
            this.$router.go(-1)
        },
        loginout(){
            getlink("http://1.116.51.111:8000/login/logout/?id=3").then((ok)=>{
                console.log(ok)
                window.localStorage.setItem(
					"Token",
					""
				);
                alert("推出登录成功")
            })
        }
    },
    data(){
        return{
            setarr:[
                {img:"/image/Mine/zfsz.png",settext:"支付设置"},
                {img:"/image/Mine/zfsz.png",settext:"收货地址"},
                {img:"/image/Mine/zfsz.png",settext:"隐私设置"},
                {img:"/image/Mine/zfsz.png",settext:"评价盒马"},
                {img:"/image/Mine/zfsz.png",settext:"检查更新"},
                {img:"/image/Mine/zfsz.png",settext:"企业采购"},
                {img:"/image/Mine/zfsz.png",settext:"关于我们"},
                {img:"/image/Mine/zfsz.png",settext:"其他设置"}
            ]
        }
    }
}
</script>

<style scoped>
.big-box{
    background-color: #f7f7f7;
}
.header{
    width: 100%;
    height: 0.665rem;
    display: flex;
    justify-content: center;
}
.header h3{
    padding-top: 0.3rem;
    width: 90%;
    font-size: 0.18rem;
    font-weight: normal;
    height: 100%;
    text-align: center;
}
.header h3 span{
    left: 0.12rem;
    position: absolute;
}
.main{
    width: 100%;
    display: flex;
    justify-content: center;
    background-color: #ffffff;
    border-bottom: 0.001rem solid #d7d7d7;
}
.main .main-box{
    width: 90%;
}
.main .main-box ul li{
    height: 0.50rem;
    border-bottom: 0.001rem solid #d7d7d7;
    background: url(/../image/Mine/yjt.png) no-repeat 101% 51%;
}
.main .main-box ul li .router-link-active{
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}
.main .main-box ul li .router-link-active p{
    margin-left: 0.1rem;
    font-size: 0.15rem;
    color: #0b0b0b;
}
.footer{
    margin-top: 0.15rem;
    width: 100%;
    display: flex;
    justify-content: center;
}
.footer-box{
    width: 90%;
    height: 0.45rem;
}
.footer-box .router-link-active{
    display: inline-block;
    width: 100%;
    height: 100%;
    text-align: center;
    line-height: 0.45rem;
    font-size: 0.16rem;
    color: #ffffff;
    border-radius: 0.5rem;
    background-color: #fea70c;
}
</style>